package HuaWei;


import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class HuaWei03 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        String[] h = sc.nextLine().split(" ");
        String[] w = sc.nextLine().split(" ");
        int[][] ans = new int[n][3];
        for (int i = 0; i < n; i++) {
            ans[i][0] = i + 1;
            ans[i][1] = Integer.parseInt(h[i]);
            ans[i][2] = Integer.parseInt(w[i]);
        }
        Arrays.sort(ans, (o1, o2) -> o1[1] == o2[1] ? o1[2] - o2[2] : o1[1] - o2[1]);
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < n; i++) {
            sb.append(ans[i][0]).append(" ");
        }
        System.out.println(sb.substring(0,sb.length()-1));
    }
}
